<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义类</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="reserved.keywords.html">« 关键词列表</a></li>
      <li style="float: right;"><a href="reserved.constants.html">预定义常量 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="reserved.html">保留字列表</a></li>
    <li>预定义类</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="reserved.classes" class="sect1">
   <h2 class="title">预定义类</h2>
   <p class="para">
    本节列出标准的预定义类。各种扩展库定义了其它类，其说明在各自的参考文档中。
   </p>

   <div class="sect2" id="reserved.classes.standard">
    <h3 class="title">标准类</h3>

    <p class="simpara">
     这些类由一些内建在 PHP 中的标准函数定义。
    </p>

    <dl>
     
      <dt>
<span class="classname"><a href="class.directory.html" class="classname">Directory</a></span></dt>

      <dd>

       <span class="simpara">
         由 <span class="function"><a href="function.dir.html" class="function">dir()</a></span> 创建。
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.stdclass.html" class="classname">stdClass</a></span></dt>

      <dd>

       <span class="simpara">
        使用<a href="language.types.object.html#language.types.object.casting" class="link">类型转换为对象</a>或者各种标准函数创建的通用空类。
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><strong class="classname">__PHP_Incomplete_Class</strong></span></dt>

      <dd>

       <span class="simpara">
        可能由 <span class="function"><a href="function.unserialize.html" class="function">unserialize()</a></span> 创建。
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.exception.html" class="classname">Exception</a></span></dt>

      <dd>

       <span class="simpara">
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.errorexception.html" class="classname">ErrorException</a></span></dt>

      <dd>

       <span class="simpara">

       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.php-user-filter.html" class="classname">php_user_filter</a></span></dt>

      <dd>

       <span class="simpara">
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.closure.html" class="classname">Closure</a></span></dt>

      <dd>

       <span class="simpara">
        预定义的 final 类 <span class="classname"><a href="class.closure.html" class="classname">Closure</a></span>，它可以用于实现
        <a href="functions.anonymous.html" class="link">匿名函数</a>。
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.generator.html" class="classname">Generator</a></span></dt>

      <dd>

       <span class="simpara">
        预定义的 final 类 <span class="classname"><a href="class.generator.html" class="classname">Generator</a></span>，它可以用于实现
        <a href="language.generators.html" class="link">生成器</a>。
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.arithmeticerror.html" class="classname">ArithmeticError</a></span></dt>

      <dd>

       <span class="simpara">
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.assertionerror.html" class="classname">AssertionError</a></span></dt>

      <dd>

       <span class="simpara">
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.divisionbyzeroerror.html" class="classname">DivisionByZeroError</a></span></dt>

      <dd>

       <span class="simpara">
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.error.html" class="classname">Error</a></span></dt>

      <dd>

       <span class="simpara">
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.throwable.html" class="classname">Throwable</a></span></dt>

      <dd>

       <span class="simpara">
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.parseerror.html" class="classname">ParseError</a></span></dt>

      <dd>

       <span class="simpara">
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><a href="class.typeerror.html" class="classname">TypeError</a></span></dt>

      <dd>

       <span class="simpara">
       </span>
      </dd>

     
    </dl>

   </div>

   <div class="sect2" id="reserved.classes.special">
    <h3 class="title">特殊的类</h3>
    
    <p class="simpara">
    以下这些标识符由于它们有特殊的用处，因此不可作为类名
    </p>
    
    <dl>
     
      <dt>
<span class="classname"><strong class="classname">self</strong></span></dt>

      <dd>

       <span class="simpara">
        <a href="language.oop5.paamayim-nekudotayim.html" class="link">当前类</a>。
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><strong class="classname">static</strong></span></dt>

      <dd>

       <span class="simpara">
        <a href="language.oop5.late-static-bindings.html" class="link">运行时的当前类</a>。
       </span>
      </dd>

     
     
      <dt>
<span class="classname"><strong class="classname">parent</strong></span></dt>

      <dd>

       <span class="simpara">
        <a href="language.oop5.paamayim-nekudotayim.html" class="link">父级类</a>。
       </span>
      </dd>

     
    </dl>

   </div>

  </div></div></div></body></html>